<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="b" uri="/b2b-tags"%>
<div class="pro_list fr"  >
   <div class="title"  >
   	 <span class="titletxt">您现在的位置：</span>
     <ul> 
       <li class="root">会员中心</li>        
       <li>其他管理</li>  
       <li>投诉建议</li>            
     </ul>
   </div>
  <c:if test="${not empty ret }">
   	<c:if test="${ret.code ne '200'}">
   		<script type="text/javascript">alertError('${ret.result}');</script>
   		<div id=messager class="messager" >
	         <div class="contentmsg">
	             <h5>提示信息～！</h5>
	             <ul>
	               <li>${ret.result}</li>
	             </ul>
	        </div>
	     <div class="closer" onClick="showHideLayer('messager');" title="关闭"></div>
	    </div>
   	</c:if>
   </c:if>
   <br/>
   <div class="easyui-tabs" data-options="tools:'#tab-tools'" >
       <div title="投诉建议提交" style="padding:10px;">
       <form action="" id="dialogfeedbackForm_Center" method="post">
	
		<table width="765px" border="0" cellspacing="0" cellpadding="0" style="margin: 20px;border-top: 1px solid #ddd;">
		  <tr>
		    <td class="table_td">选择类型：</td>
		    <td class="juleft" colspan="5">
		        <select class="easyui- combobox" name="typeId" >
		        <b:showCmsCategory outResponseAttrName="tousuRet" getType="list" typeId="2" /> 
			        <c:forEach items="${tousuRet}" var="p">
			       	 	<option value="${p.newsTypeId }">${p.name }</option>
			        </c:forEach>
		        </select>
		    </td>
		  </tr>
		  <tr>
		    <td class="table_td" >标题：</td>
		    <td class="juleft" colspan="5">
		     <input class="easyui-validatebox" data-options="required:true"  name="complaintTitle">
		    </td>
		  </tr>
		  <tr>
		    <td class="table_td" >内容描述：</td>
		    <td class="juleft"  colspan="5">
		  		<textarea rows="6" cols="90" style="border-color:#ccc;text-align: left;" name="complaintContent" data-options="required:true"></textarea>
		    </td>
		  </tr>
		   <tr>
		    <td class="table_td" >联系电话：</td>
		    <td class="juleft" colspan="5">
		     <input class="easyui-validatebox " name="connectPhone"   data-options="required:true,validType:'mobile'">
		    </td>
		  </tr>
		  <tr>
		  	<td>
		    
		    </td>
		    <td>
		    	<a href="javascript:sub();" class="easyui-linkbutton" style="width:80px; margin-top:10px;">提交申请</a>
		        </td>
		      </tr>
		</table>
		</form>
	</div>
 
    </div>
</div>
                         
<script>

function sub(){
	$('#dialogfeedbackForm_Center').form('submit', {
	    url:'<c:url value="/complaint/addEmBComplaint.s" />',
	    onSubmit: function(param){
	    	if(!$("#dialogfeedbackForm_Center").form('validate')){
	    		return false;
	    	}
	    },
	    success:function(data){
		    var ret = eval("("+data+")");
	     	if(ret.code=="200"){ 
	     		 layer.msg("添加成功",1, {type: 1,shade: [0.2, '#ccc']});
		    }else{
		    	 layer.msg(ret.result,1, {type: 3,shade: [0.2, '#ccc']});
			}
	    }
	});
}


</script>